package com.me.myFramework.myDI.util;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * 手写 Spring: Bean定义对象
 *
 * @author ME
 * @date 2019/12/9
 */
public class MyBeanDefinition {

    private String beanName;
    private String className;
    private List<Map<String, String>> properties = new LinkedList<>();
    private List<Map<String, String>> constructorArgs = new LinkedList<>();

    public MyBeanDefinition(String beanName, String className) {
        this.beanName = beanName;
        this.className = className;
    }

    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public List<Map<String, String>> getProperties() {
        return properties;
    }

    public void setProperties(List<Map<String, String>> properties) {
        this.properties = properties;
    }

    public void addProperty(Map<String, String> property) {
        this.properties.add(property);
    }

    public List<Map<String, String>> getConstructorArgs() {
        return constructorArgs;
    }

    public void setConstructorArgs(List<Map<String, String>> constructorArgs) {
        this.constructorArgs = constructorArgs;
    }

    public void addConstructorArg(Map<String, String> constructorArg) {
        this.constructorArgs.add(constructorArg);
    }
}
